package com.mrjy.maintain.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.StageInfo;
import com.mrjy.maintain.bo.IStageInfoBo;

@RequestMapping("/maintain/stageInfo")
@Controller
public class StageInfoController {

	@Resource
	private IStageInfoBo stageInfoBo;
	
	@RequestMapping("/insert")
	@ResponseBody
	public Object insert(StageInfo stageInfo, HttpSession session) {
		return stageInfoBo.txInsert(stageInfo);
	}

	@RequestMapping("/deleteByIds")
	@ResponseBody
	public Object deleteByIds(int[] ids) {		
		return stageInfoBo.txDeleteByIds(ids);
	}
	
	@RequestMapping("/updateDisableFlag")
	@ResponseBody
	public Object updateDisableFlag(StageInfo stageInfo) {		
		return stageInfoBo.updateDisableFlag(stageInfo);
	}
		
	@RequestMapping("/updateById")
	@ResponseBody
	public Object updateById(StageInfo stageInfo) {
		return stageInfoBo.txUpdateById(stageInfo);
	}
	
	@RequestMapping("/queryById")
	@ResponseBody
	public Object queryById(int id) {
		return stageInfoBo.queryById(id);
	}
	
	/**
	 * 分页查询阶段信息
	 * @param stageInfo
	 * @return
	 * @author Javin: isUer = true
	 */
	@RequestMapping("/queryList")
	@ResponseBody
	public Object queryList(StageInfo stageInfo){
		return stageInfoBo.queryList(stageInfo);
	}
		
	@RequestMapping("/queryPage")
	@ResponseBody
	public Object queryPage(StageInfo stageInfo) {
		return stageInfoBo.queryPage(stageInfo);
	}
	/**
	 * 查询所有stageInfo数据
	 * @author csshui
	 * @return
	 */
	@RequestMapping("/selectListForWeUIPicker") 
	@ResponseBody
	public Object selectListForWeUIPicker(){
		return stageInfoBo.selectListForWeUIPicker();
	}
	
}
